﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter12.Code04
{
    public class Chicken : Animal, IMethaneProducer<Chicken>, IGrassMuncher<Animal>
    {
        public void LayEgg()
        {
            Console.WriteLine("{0} has laid an egg.", name);
        }


        public Chicken(string newName)
            : base(newName)
        {

        }

        public override void MakeANoise()
        {
            Console.WriteLine("{0} says 'moo!'", name);
        }
    }
}
